package com.substation.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.greenentity.Area;
import com.greenentity.DataDictionary;
import com.greenentity.Defect;
import com.greenentity.Eqpt;
import com.greenentity.Inspect;
import com.greenentity.Ready;
import com.greenentity.SafetyCard;
import com.greenentity.SafetyTool;
import com.greenentity.Substation;
import com.greenentity.Task;
import com.greenentity.Unit;
import com.greenentity.Photo;
import com.greenentity.TourDefect;
import com.greenentity.Tools;
import com.greenentity.Stdby;
import com.greenentity.Logger;

import com.substation.greendao.AreaDao;
import com.substation.greendao.DataDictionaryDao;
import com.substation.greendao.DefectDao;
import com.substation.greendao.EqptDao;
import com.substation.greendao.InspectDao;
import com.substation.greendao.ReadyDao;
import com.substation.greendao.SafetyCardDao;
import com.substation.greendao.SafetyToolDao;
import com.substation.greendao.SubstationDao;
import com.substation.greendao.TaskDao;
import com.substation.greendao.UnitDao;
import com.substation.greendao.PhotoDao;
import com.substation.greendao.TourDefectDao;
import com.substation.greendao.ToolsDao;
import com.substation.greendao.StdbyDao;
import com.substation.greendao.LoggerDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig areaDaoConfig;
    private final DaoConfig dataDictionaryDaoConfig;
    private final DaoConfig defectDaoConfig;
    private final DaoConfig eqptDaoConfig;
    private final DaoConfig inspectDaoConfig;
    private final DaoConfig readyDaoConfig;
    private final DaoConfig safetyCardDaoConfig;
    private final DaoConfig safetyToolDaoConfig;
    private final DaoConfig substationDaoConfig;
    private final DaoConfig taskDaoConfig;
    private final DaoConfig unitDaoConfig;
    private final DaoConfig photoDaoConfig;
    private final DaoConfig tourDefectDaoConfig;
    private final DaoConfig toolsDaoConfig;
    private final DaoConfig stdbyDaoConfig;
    private final DaoConfig loggerDaoConfig;

    private final AreaDao areaDao;
    private final DataDictionaryDao dataDictionaryDao;
    private final DefectDao defectDao;
    private final EqptDao eqptDao;
    private final InspectDao inspectDao;
    private final ReadyDao readyDao;
    private final SafetyCardDao safetyCardDao;
    private final SafetyToolDao safetyToolDao;
    private final SubstationDao substationDao;
    private final TaskDao taskDao;
    private final UnitDao unitDao;
    private final PhotoDao photoDao;
    private final TourDefectDao tourDefectDao;
    private final ToolsDao toolsDao;
    private final StdbyDao stdbyDao;
    private final LoggerDao loggerDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        areaDaoConfig = daoConfigMap.get(AreaDao.class).clone();
        areaDaoConfig.initIdentityScope(type);

        dataDictionaryDaoConfig = daoConfigMap.get(DataDictionaryDao.class).clone();
        dataDictionaryDaoConfig.initIdentityScope(type);

        defectDaoConfig = daoConfigMap.get(DefectDao.class).clone();
        defectDaoConfig.initIdentityScope(type);

        eqptDaoConfig = daoConfigMap.get(EqptDao.class).clone();
        eqptDaoConfig.initIdentityScope(type);

        inspectDaoConfig = daoConfigMap.get(InspectDao.class).clone();
        inspectDaoConfig.initIdentityScope(type);

        readyDaoConfig = daoConfigMap.get(ReadyDao.class).clone();
        readyDaoConfig.initIdentityScope(type);

        safetyCardDaoConfig = daoConfigMap.get(SafetyCardDao.class).clone();
        safetyCardDaoConfig.initIdentityScope(type);

        safetyToolDaoConfig = daoConfigMap.get(SafetyToolDao.class).clone();
        safetyToolDaoConfig.initIdentityScope(type);

        substationDaoConfig = daoConfigMap.get(SubstationDao.class).clone();
        substationDaoConfig.initIdentityScope(type);

        taskDaoConfig = daoConfigMap.get(TaskDao.class).clone();
        taskDaoConfig.initIdentityScope(type);

        unitDaoConfig = daoConfigMap.get(UnitDao.class).clone();
        unitDaoConfig.initIdentityScope(type);

        photoDaoConfig = daoConfigMap.get(PhotoDao.class).clone();
        photoDaoConfig.initIdentityScope(type);

        tourDefectDaoConfig = daoConfigMap.get(TourDefectDao.class).clone();
        tourDefectDaoConfig.initIdentityScope(type);

        toolsDaoConfig = daoConfigMap.get(ToolsDao.class).clone();
        toolsDaoConfig.initIdentityScope(type);

        stdbyDaoConfig = daoConfigMap.get(StdbyDao.class).clone();
        stdbyDaoConfig.initIdentityScope(type);

        loggerDaoConfig = daoConfigMap.get(LoggerDao.class).clone();
        loggerDaoConfig.initIdentityScope(type);

        areaDao = new AreaDao(areaDaoConfig, this);
        dataDictionaryDao = new DataDictionaryDao(dataDictionaryDaoConfig, this);
        defectDao = new DefectDao(defectDaoConfig, this);
        eqptDao = new EqptDao(eqptDaoConfig, this);
        inspectDao = new InspectDao(inspectDaoConfig, this);
        readyDao = new ReadyDao(readyDaoConfig, this);
        safetyCardDao = new SafetyCardDao(safetyCardDaoConfig, this);
        safetyToolDao = new SafetyToolDao(safetyToolDaoConfig, this);
        substationDao = new SubstationDao(substationDaoConfig, this);
        taskDao = new TaskDao(taskDaoConfig, this);
        unitDao = new UnitDao(unitDaoConfig, this);
        photoDao = new PhotoDao(photoDaoConfig, this);
        tourDefectDao = new TourDefectDao(tourDefectDaoConfig, this);
        toolsDao = new ToolsDao(toolsDaoConfig, this);
        stdbyDao = new StdbyDao(stdbyDaoConfig, this);
        loggerDao = new LoggerDao(loggerDaoConfig, this);

        registerDao(Area.class, areaDao);
        registerDao(DataDictionary.class, dataDictionaryDao);
        registerDao(Defect.class, defectDao);
        registerDao(Eqpt.class, eqptDao);
        registerDao(Inspect.class, inspectDao);
        registerDao(Ready.class, readyDao);
        registerDao(SafetyCard.class, safetyCardDao);
        registerDao(SafetyTool.class, safetyToolDao);
        registerDao(Substation.class, substationDao);
        registerDao(Task.class, taskDao);
        registerDao(Unit.class, unitDao);
        registerDao(Photo.class, photoDao);
        registerDao(TourDefect.class, tourDefectDao);
        registerDao(Tools.class, toolsDao);
        registerDao(Stdby.class, stdbyDao);
        registerDao(Logger.class, loggerDao);
    }
    
    public void clear() {
        areaDaoConfig.clearIdentityScope();
        dataDictionaryDaoConfig.clearIdentityScope();
        defectDaoConfig.clearIdentityScope();
        eqptDaoConfig.clearIdentityScope();
        inspectDaoConfig.clearIdentityScope();
        readyDaoConfig.clearIdentityScope();
        safetyCardDaoConfig.clearIdentityScope();
        safetyToolDaoConfig.clearIdentityScope();
        substationDaoConfig.clearIdentityScope();
        taskDaoConfig.clearIdentityScope();
        unitDaoConfig.clearIdentityScope();
        photoDaoConfig.clearIdentityScope();
        tourDefectDaoConfig.clearIdentityScope();
        toolsDaoConfig.clearIdentityScope();
        stdbyDaoConfig.clearIdentityScope();
        loggerDaoConfig.clearIdentityScope();
    }

    public AreaDao getAreaDao() {
        return areaDao;
    }

    public DataDictionaryDao getDataDictionaryDao() {
        return dataDictionaryDao;
    }

    public DefectDao getDefectDao() {
        return defectDao;
    }

    public EqptDao getEqptDao() {
        return eqptDao;
    }

    public InspectDao getInspectDao() {
        return inspectDao;
    }

    public ReadyDao getReadyDao() {
        return readyDao;
    }

    public SafetyCardDao getSafetyCardDao() {
        return safetyCardDao;
    }

    public SafetyToolDao getSafetyToolDao() {
        return safetyToolDao;
    }

    public SubstationDao getSubstationDao() {
        return substationDao;
    }

    public TaskDao getTaskDao() {
        return taskDao;
    }

    public UnitDao getUnitDao() {
        return unitDao;
    }

    public PhotoDao getPhotoDao() {
        return photoDao;
    }

    public TourDefectDao getTourDefectDao() {
        return tourDefectDao;
    }

    public ToolsDao getToolsDao() {
        return toolsDao;
    }

    public StdbyDao getStdbyDao() {
        return stdbyDao;
    }

    public LoggerDao getLoggerDao() {
        return loggerDao;
    }

}
